package team.xyg.cdtu2.controller;

import team.xyg.cdtu2.dto.PlatMapData;
import team.xyg.cdtu2.entity.Visit;
import team.xyg.cdtu2.service.VisitService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * (Visit)表控制层
 *
 * @author makejava
 * @since 2022-06-28 08:54:32
 */
@RestController
@RequestMapping("visit")
public class VisitController {



    /**
     * 服务对象
     */
    @Resource
    private VisitService visitService;




    /**
     * 新增数据
     *
     * @param visit 实体
     * @return 新增结果
     */
    @PostMapping
    public ResponseEntity<Visit> add(Visit visit) {
        return ResponseEntity.ok(this.visitService.insert(visit));
    }



}

